home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / CODA_CAC.{9P < prev    next >
Text File  |  1999-09-17  |  2KB  |  78 lines

  1. /* Coda filesystem -- Linux Minicache
  2.  *
  3.  * Copyright (C) 1989 - 1997 Carnegie Mellon University
  4.  *
  5.  * Carnegie Mellon University encourages users of this software to
  6.  * contribute improvements to the Coda project. Contact Peter Braam
  7.  * <coda@cs.cmu.edu>
  8.  */
  9.  
  10. #ifndef _CFSNC_HEADER_
  11. #define _CFSNC_HEADER_
  12.  
  13. /*
  14.  * Structure for an element in the Coda Credential Cache.
  15.  */
  16.  
  17. struct coda_cache {
  18.     struct list_head   cc_cclist;  /* list of all cache entries */
  19.     struct list_head   cc_cnlist;  /* list of cache entries/cnode */
  20.     int                cc_mask;
  21.     struct coda_cred   cc_cred;
  22. };
  23.  
  24. /* credential cache */
  25. void coda_cache_enter(struct inode *inode, int mask);
  26. void coda_cache_clear_inode(struct inode *);
  27. void coda_cache_clear_all(struct super_block *sb);
  28. void coda_cache_clear_cred(struct super_block *sb, struct coda_cred *cred);
  29. int coda_cache_check(struct inode *inode, int mask);
  30.  
  31. /* for downcalls and attributes and lookups */
  32. void coda_flag_inode(struct inode *inode, int flag);
  33. void coda_flag_inode_children(struct inode *inode, int flag);
  34.  
  35.  
  36. /*
  37.  * Structure to contain statistics on the cache usage
  38.  */
  39.  
  40. struct cfsnc_statistics {
  41.     unsigned    hits;
  42.     unsigned    misses;
  43.     unsigned    enters;
  44.     unsigned    dbl_enters;
  45.     unsigned    long_name_enters;
  46.     unsigned    long_name_lookups;
  47.     unsigned    long_remove;
  48.     unsigned    lru_rm;
  49.     unsigned    zapPfids;
  50.     unsigned    zapFids;
  51.     unsigned    zapFile;
  52.     unsigned    zapUsers;
  53.     unsigned    Flushes;
  54.     unsigned        Sum_bucket_len;
  55.     unsigned        Sum2_bucket_len;
  56.     unsigned        Max_bucket_len;
  57.     unsigned        Num_zero_len;
  58.     unsigned        Search_len;
  59. };
  60.  
  61.  
  62. #define CFSNC_FIND        ((u_long) 1)
  63. #define CFSNC_REMOVE        ((u_long) 2)
  64. #define CFSNC_INIT        ((u_long) 3)
  65. #define CFSNC_ENTER        ((u_long) 4)
  66. #define CFSNC_LOOKUP        ((u_long) 5)
  67. #define CFSNC_ZAPPFID        ((u_long) 6)
  68. #define CFSNC_ZAPFID        ((u_long) 7)
  69. #define CFSNC_ZAPVNODE        ((u_long) 8)
  70. #define CFSNC_ZAPFILE        ((u_long) 9)
  71. #define CFSNC_PURGEUSER    ((u_long) 10)
  72. #define CFSNC_FLUSH        ((u_long) 11)
  73. #define CFSNC_PRINTCFSNC    ((u_long) 12)
  74. #define CFSNC_PRINTSTATS    ((u_long) 13)
  75. #define CFSNC_REPLACE        ((u_long) 14)
  76.  
  77. #endif _CFSNC_HEADER_
  78.